<?php

namespace App\Strategies;

use App\Helpers\Formater\NumberFormater;
use App\Models\Factory\UserFactory;
use App\Strategies\AppStrategy;

/**
 * Class GetTimeStrategy
 * @package App\Strategies
 */


//

class GetProductStrategy
{

    //根据传过去的值,循环,判断是哪种人群
    public static function getCrowd($crowds){

        $crowds = explode(',', $crowds);

        $status = '';
        foreach ($crowds as $crowd){

           switch ($crowd){

           case 1:
                $status  .= '上班族 ';
            break;
            case 2:
                $status .= '学生党 ';
            break;
            case 3:
                $status .= '逍遥客 ';
           break;
               case 4:
               $status .= '企业主 ';
           break;
               default:
           break;

           }


        }
        return $status;

    }

    //拿到产品的审核方式


    public static function getReview($review){

        if($review == 0){

            return $review = '自动审核';

        }elseif($review == 1){

            return $review = '人工审核';

        }



    }

    
    //根据状态,判断用户审核状态
    
    public static  function getStatus($status){

        switch ($status){

            case 1:
                $status  = ' 申请中';
                break;
            case 2:
                $status = '审核通过';
                break;
            case 3:
                $status = '审核驳回';
                break;
            case 4:
                $status = '自己撤回';
                break;
            case 5:
                $status = '申请过';
                break;
            default:
                break;

        }
        
        return $status;
    }
    
}
